package com.learn.yu.life;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author : Yu.Tan
 * @date : 2023/6/16 17:17
 * @desc : **
 */
@Slf4j
public class UserLifeApp {
    public static void main(String[] args) {
        log.info("Init application context");
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("com.learn.yu.life");
        UserLife userLife = context.getBean(UserLife.class);
        log.info(userLife.toString());
        log.info("Shutdown application context");
        context.registerShutdownHook();
    }
}
